package com.kplan.plan.action;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.kplan.action.Action;
import com.kplan.plan.dto.BoardListDto;
import com.kplan.plan.service.BoardService;

public class BoardListAction implements Action {
	
private static BoardListAction boardListAction;
	
	static{
		boardListAction = new BoardListAction();
	}
	private BoardListAction(){}
	public static BoardListAction getInstance(){
		return boardListAction;
	}

	@Override
	public String action(HttpServletRequest request,
			HttpServletResponse response) {
		List<BoardListDto> blist = BoardService.getInstance().boardlist();
		request.setAttribute("boardList", blist);
		
		return "/board/boardlist.jsp";
	}

}
